package com.example.test.a20240530;

import io.swagger.models.auth.In;

import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Scanner;

public class HJ59找出字符串中第一个只出现一次的字符 {
    public static void main(String[] args) {


        Scanner in = new Scanner(System.in);

        final String str = in.nextLine();

        final HashMap<Character, Integer> map = new LinkedHashMap<>();
        for (int i = 0; i < str.length(); i++) {
            final char c = str.charAt(i);
            Integer count = map.get(c);
            if (count == null) {
                map.put(str.charAt(i), 1);
            } else {
                map.put(str.charAt(i), count + 1);
            }
        }

        String result = null;
        for (Map.Entry<Character, Integer> entry : map.entrySet()) {
            if (entry.getValue() == 1) {
                result = String.valueOf(entry.getKey());
                break;
            }
        }
        if (result == null) {
            result = "-1";
        }
        System.out.println(result);

    }
}